/**
 * Author:   e20160504
 * Date:     2018/7/4 14:53
 * Description:
 */
package com.kevin.demo.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * * <p>数据库数据源配置</p>
 * * <p>说明:这个类中包含了许多默认配置,若这些配置符合您的情况,您可以不用管,若不符合,建议不要修改本类,建议直接在"application.yml"中配置即可</p>
 * * @author kevin
 */
@Component
@ConfigurationProperties(prefix = "spring.datasource")
public class DataSourceConfiguration {

    private String url = "jdbc:mysql://172.20.7.108:3306/sap?useUnicode=true&characterEncoding=utf8&autoReconnect=true&useSSL=false";

    private String username = "root";

    private String password = "root";

    private String driverClassName = "com.mysql.jdbc.Driver";

    private Integer initialSize = 2;

    private Integer minIdle = 1;

    private Integer maxActive = 20;

    private Integer maxWait = 60000;

    private Integer timeBetweenEvictionRunsMillis = 60000;

    private Integer minEvictableIdleTimeMillis = 300000;

    private String validationQuery = "SELECT 'x'";

    private Boolean testWhileIdle = true;

    private Boolean testOnBorrow = false;

    private Boolean testOnReturn = false;

    private Boolean poolPreparedStatements = true;

    private Integer maxPoolPreparedStatementPerConnectionSize = 20;

    private String filters = "stat";


}
